#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <set>

using namespace std;

void calWays(int index, int coins[], int size, vector<int> &count, int &ways, int target)
{
    if (index == size) {
	if (target == 0) {
	    for (int i = 0; i < count.size(); i++) 
		cout << count[i] << " ";
	    cout << endl;
	    ways++;
	}	
	return;
    }

    for (int j = 0; j *coins[index] <= target; j++) {
	count[index] = j;
	calWays(index+1, coins, size, count, ways, target - j*coins[index]);
	count[index] = 0;
    }
}


int main(int argc, char **argv)
{
    int coins[] = {25, 10, 5, 1};
    int ways = 0;
    vector<int> count(sizeof(coins)/sizeof(int), 0);
    int target = 30;
    calWays(0, coins, sizeof(coins)/sizeof(int), count, ways, target);
    cout << ways << endl;
}
